Skip to content

Guard three x86-only assumptions so Omarchy can install on aarch64 - #8039

Open
oceanapplications wants to merge 2 commits into
omacom:quattrofrom
oceanapplications:aarch64-runtime-guards
Open

Guard three x86-only assumptions so Omarchy can install on aarch64#8039
oceanapplications wants to merge 2 commits into
omacom:quattrofrom
oceanapplications:aarch64-runtime-guards

Conversation

@oceanapplications

@oceanapplications oceanapplications commented Aug 24, 2026

Copy link
Copy Markdown

Three unconditional assumptions in the install path only hold on x86_64. None is
x86-specific in spirit, and each one blocks or breaks an ARM64 install. All three were
found by actually installing Omarchy on aarch64 (Arch Linux ARM) and are fixed the same
way: derive from uname -m instead of assuming.

1. etc/mkinitcpio.conf.d/thunderbolt_module.conf

MODULES+=(thunderbolt) is unconditional, but Thunderbolt is x86-oriented hardware and the
module isn't built for every architecture. ALARM's aarch64 kernel has no thunderbolt, and
mkinitcpio treats an unresolvable MODULES entry as a hard error, so every initramfs
build fails:

==> ERROR: module not found: `thunderbolt'

No initramfs means no UKI, no boot entry, and an install that completes and then can't boot.
Because bootloader setup is the last phase, the failure surfaces as "no operating system
installed"
at the firmware, which points at the wrong end of the process entirely.

2. install/post-install/pacman.sh

This overwrites /etc/pacman.conf and the mirrorlist unconditionally with files that
describe an x86_64 Arch system: [multilib] is 32-bit x86 libraries and exists on no ARM
mirror, and the mirrorlist points at Omarchy's mirror of Arch, which is x86_64 only. Arch
Linux ARM also lays its tree out as $arch/$repo rather than Arch's $repo/os/$arch, so
the mirrorlist can't simply be pointed at a different host.

The first revision of this PR skipped the restore on aarch64. That was wrong: at this point
the target still carries the live ISO's pacman.conf, which knows only the offline mirror,
and that directory doesn't exist on the installed system. Skipping left every aarch64
install unable to run pacman at all.

This revision derives the config from Omarchy's template instead: drop [multilib], keep
[omarchy] (its $arch placeholder resolves correctly), add ALARM's [alarm] and [aur]
repositories, and leave the mirrorlist the distribution installed. The [options] block
and everything else in the template come through unchanged, so OMARCHY_MIRROR still
selects stable/edge/rc as it does on x86.

Known gap, not addressed here: pkgs.omarchy.org has no aarch64 tree yet
(omacom/omarchy-pkgs#199), so [omarchy] 404s on ARM. pacman refuses all sync
transactions while a configured repository's database is missing, so until that tree is
published an aarch64 install can't pacman -S anything. The config written here is the
one that starts working the moment the tree exists; omitting [omarchy] would work today
and then never update Omarchy.

3. install/user/mise-work.sh

Node publishes its builds as linux-x64 / linux-arm64, which does not match
uname -m. The bundled-tarball lookup hardcodes linux-x64, so on ARM it finds nothing and
the install aborts:

failed phase: Staging provisioning: no bundled Node tarball in /opt/packages

The sed that parses the version back out of the filename needs the same treatment,
otherwise it silently yields the whole filename instead of the version.

Testing

On Arch Linux ARM aarch64, natively rather than under emulation:

  • Each guard, both branches. thunderbolt_module.conf sourced with uname -m faked to
    each architecture yields MODULES=(thunderbolt) on x86_64 and empty on aarch64, and a
    real mkinitcpio run with the guarded file succeeds on a kernel without the module.
    mise-work.sh's lookup and sed were run against node-v24.7.0-linux-{x64,arm64}.tar.gz
    under both architectures; each finds its own tarball and extracts 24.7.0, and the
    upstream x86 sed gives the same answer on the x64 file.

  • pacman.sh, sandboxed, all three mirrors. With /etc redirected, the script was run
    for stable, edge and rc on aarch64: [multilib] gone, [options] byte-identical to
    the template, the mirrorlist untouched, and pacman-conf --repo-list parses the result as
    core extra omarchy alarm aur. With uname -m faked to x86_64 the output is
    byte-identical to the plain cp of both files. A live pacman -Sy against the stable
    output synced core, extra, alarm and aur from ALARM's mirror; only omarchy
    failed, with the 404 described above.

  • Full install. omarchy and omarchy-settings packages built from this branch went
    into an ISO (Build the ISO for the host architecture, adding aarch64 support omarchy-iso#121), which installed to an encrypted target and
    booted unattended into the desktop. On the installed system /etc/pacman.conf is the
    derived one, the mirrorlist is the one ALARM's pacman-mirrorlist installed, and
    pacman -Sy syncs core, extra, alarm and aur with no errors; the only failure is
    omarchy.db, the 404 described above.

    The first run of this test also showed the installer prepending three x86 Arch mirrors to
    the target's mirrorlist, so every sync walked through a dozen 404s before reaching ALARM's.
    That is the ISO's configurator, not this repository, and is fixed in omarchy-iso#121.

All three files pass bash -n and ShellCheck. No behaviour change on x86_64: each guard
takes the existing path there, and pacman.sh's x86_64 branch is the unchanged two-line copy.

Each of these is an unconditional assumption that only holds on x86_64. None
is x86-specific in spirit, and each one blocks or breaks an ARM64 install.

1. etc/mkinitcpio.conf.d/thunderbolt_module.conf

   MODULES+=(thunderbolt) is unconditional, but Thunderbolt is x86-oriented
   hardware and the module is not built for every architecture -- Arch Linux
   ARM's aarch64 kernel has no `thunderbolt`. mkinitcpio treats an unresolvable
   MODULES entry as a hard error, so *every* initramfs build fails:

     ==> ERROR: module not found: `thunderbolt'

   That means no UKI, no boot entry, and an install that completes and then
   cannot boot.

2. install/post-install/pacman.sh

   This overwrites /etc/pacman.conf unconditionally. That config points
   [core]/[extra]/[multilib] at Omarchy's mirror of Arch, which is x86_64-only,
   and [omarchy] at pkgs.omarchy.org/stable/$arch, which 404s for aarch64.
   ([multilib] is 32-bit x86 libraries and exists on no ARM mirror at all.)
   Applying it on ARM leaves the installed system unable to update anything.

3. install/user/mise-work.sh

   Node publishes its builds as linux-x64 / linux-arm64, which does not match
   uname -m. The bundled-tarball lookup hardcodes linux-x64, so on ARM it finds
   nothing and the install aborts with "no bundled Node tarball". The sed that
   parses the version back out of the filename needs the same treatment.

All three were found by installing Omarchy on aarch64 (Arch Linux ARM) and are
fixed here the same way: derive from uname -m rather than assuming.
Copilot AI balanced review requested due to automatic review settings August 24, 2026 12:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables Omarchy installation on aarch64 while preserving x86_64 behavior.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Skips x86-only pacman configuration and Thunderbolt module loading on ARM64.
  • Maps aarch64 to Node’s arm64 tarball naming.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
install/user/mise-work.sh Selects and parses architecture-specific Node bundles.
install/post-install/pacman.sh Preserves ARM-compatible pacman configuration.
etc/mkinitcpio.conf.d/thunderbolt_module.conf Loads Thunderbolt only on x86_64.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The previous guard skipped the pacman.conf restore on aarch64 on the grounds
that Omarchy's config points at x86-only repositories. But at that point the
target still carries the live ISO's pacman.conf, which knows only the offline
mirror, and that directory does not exist on the installed system. Skipping
therefore left every aarch64 install unable to run pacman at all, which is the
outcome the guard claimed to prevent.

Derive the config from Omarchy's template instead: drop [multilib], keep
[omarchy] (its $arch placeholder resolves correctly), add Arch Linux ARM's
[alarm] and [aur] repositories, and leave the mirrorlist the distribution
installed rather than replacing it with Omarchy's x86_64 mirror of Arch. The
x86_64 path is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants